Skip to content

refactor: replace _get_hash_context with direct ->hash_ctx access - #1908

Merged
real-or-random merged 1 commit into
bitcoin-core:masterfrom
theStack:nuke-get_hash_context
Aug 24, 2026
Merged

refactor: replace _get_hash_context with direct ->hash_ctx access#1908
real-or-random merged 1 commit into
bitcoin-core:masterfrom
theStack:nuke-get_hash_context

Conversation

@theStack

@theStack theStack commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

See issue #1835: #1835 (comment).

@real-or-random real-or-random left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 0cdbd2e

@theStack
theStack force-pushed the nuke-get_hash_context branch from 0cdbd2e to c8745f6 Compare August 24, 2026 05:54
@theStack

Copy link
Copy Markdown
Contributor Author

Rebased on master to resolve merge conflicts (caused by #1915).

@apoelstra apoelstra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK c8745f6; successfully ran local tests

@real-or-random real-or-random left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK c8745f6

@real-or-random
real-or-random merged commit bae6b89 into bitcoin-core:master Aug 24, 2026
122 checks passed
@theStack
theStack deleted the nuke-get_hash_context branch August 24, 2026 12:37

@furszy furszy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-merge ACK c8745f6

macgyver13 added a commit to macgyver13/secp256k1 that referenced this pull request Aug 28, 2026
Implements BIP-374 Discrete Log Equality (DLEQ) proofs as a new module.

- Build system integration (CMake, autotools)
- Configure dleq module as optional, but enabled in dev mode
- Public API header declarations
- Internal cryptographic implementation (prove_internal, verify_internal)
- Tagged SHA256 functions per BIP-374 specification
- Nonce generation following BIP-374

Proof generation and verification both reject infinity points, and the
secret-derived buffers (the masked key, the nonce, and the serialized
secret scalar a) are cleared before returning.

- Rearrange e and s in prove_internal and verify_internal to match
  serialization order
- Arrange dleq_challenge parameters in hash order
- Compare the challenge with secp256k1_scalar_eq instead of negate-and-
  test-for-zero
- Use &ctx->hash_ctx directly (bitcoin-core#1908 removed the get_hash_context()
  accessor)
- Pass NULL rather than secp256k1_scalar_zero for the unused G scalar
  in secp256k1_ecmult (bitcoin-core#1834)

Co-authored-by: stratospher <44024636+stratospher@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants